pow

pure function pow(exponent: integer): integer

Raises this integer to the power of the given exponent. Can be used in a database at-expression.

  1. The exponent cannot be negative.

  2. Error on overflow, if the result is out of integer or integer range.

  3. Beware that the result of integer.pow() is limited to the 64-bit signed integer range, so the operation like (2).pow(64) will overflow - use big_integer.pow() to get a big_integer result, e.g. (2).to_big_integer().pow(64).

  4. If the exponent is 0, the result is always 1; if the exponent is 1, the result is the original value.

Since

0.13.6

Parameters

exponent

The exponent.